//
//  WKProfileCell.m
//  WeKeTang
//
//  Created by ichina on 2017/11/13.
//  Copyright © 2017年 Dezhi Tiancheng Education Technology (Beijing) Co. Ltd. All rights reserved.
//

#import "WKProfileCell.h"

@interface WKProfileCell ()

@end

@implementation WKProfileCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self setupUI];
    }
    return self;
}
- (void)setupUI{
    
    self.imgView = [[UIImageView alloc]init];
    [self.contentView addSubview:self.imgView];
    self.titleLabel = [[YYLabel alloc]init];
    self.titleLabel.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.titleLabel];
    self.titleLabel.textColor = [UIColor colorWithHexString:@"#333333"];
    
}
- (void)setTitle:(NSString *)title{
    _title = title;
     self.titleLabel.text = title;
}
- (void)setImgName:(NSString *)imgName{
    _imgName = imgName;
     self.imgView.image = [UIImage imageNamed:imgName];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(10,(50-20)*0.5, 20, 20);
    self.titleLabel.frame = CGRectMake(CGRectGetMaxX(self.imgView.frame)+10,(50-21)*0.5, 200, 21);
}


@end
